package com.synergy.stockflow.entity.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;
import java.util.List;

@Schema(description = "字典类型视图对象（返回前端）")
@Data
@NoArgsConstructor
@AllArgsConstructor
public class SysDictTypeVO {
    @Schema(description = "类型编号", example = "1")
    private Integer dictTypeId;

    @Schema(description = "类型编码", example = "ORDER_STATUS")
    private String typeCode;

    @Schema(description = "类型名称", example = "")
    private String typeName;

    @Schema(description = "描述", example = "订单生命周期状态")
    private String description;

    @Schema(description = "状态", example = "1")
    private Byte status;

    @Schema(description = "创建人ID", example = "1001")
    private Long createBy;

    @Schema(description = "创建人姓名", example = "张三")  // 扩展字段
    private String createByName;

    @Schema(description = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    @Schema(description = "更新人ID", example = "1001")
    private Long updateBy;

    @Schema(description = "更新人姓名", example = "李四")
    private String updateByName;

    @Schema(description = "更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    @Schema(description = "是否已删除", example = "false")
    private Boolean deleted; // 更友好的布尔值

    @Schema(description = "字典项列表")
    private List<SysDictItemVO> items;
}